#include "pvm/pvmapi.h"
#include "pvm/pvmhelperapi.h"
#include "lib/pvmsystem.h"
#include "lib/pvmstrings.h"

#include "lib/memory/pvmmemory.h"

PVMAPI pvm_int PVMCALL PVMHFindDriverByShortNameWZ(const pvm_char* name)
{
	pvm_int retVal = -1;
	pvm_int drvCount = PVMGetDriversCount();
	pvm_char driverName[256];

	for(pvm_int i=0; i<drvCount; i++)
	{
		if((PVMGetDriverNameShort(i, driverName, 256)>0)&&(pvm_strcmp(driverName, name)==0))
		{
			retVal = i;
			break;
		}
	}

	return retVal;
}
